home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
usr
/
bin
/
ps2ascii
< prev
next >
Wrap
Text File
|
2009-10-12
|
786b
|
23 lines
#!/bin/sh
# $Id: ps2ascii 6300 2005-12-28 19:56:24Z giles $
# Extract ASCII text from a PostScript file. Usage:
# ps2ascii [infile.ps [outfile.txt]]
# If outfile is omitted, output goes to stdout.
# If both infile and outfile are omitted, ps2ascii acts as a filter,
# reading from stdin and writing on stdout.
# This definition is changed on install to match the
# executable name set in the makefile
GS_EXECUTABLE=gs
trap "rm -f _temp_.err _temp_.out" 0 1 2 15
OPTIONS="-q -dNODISPLAY -dSAFER -dDELAYBIND -dWRITESYSTEMDICT -dSIMPLE"
if ( test $# -eq 0 ) then
$GS_EXECUTABLE $OPTIONS -c save -f ps2ascii.ps - -c quit
elif ( test $# -eq 1 ) then
$GS_EXECUTABLE $OPTIONS -c save -f ps2ascii.ps "$1" -c quit
else
$GS_EXECUTABLE $OPTIONS -c save -f ps2ascii.ps "$1" -c quit >"$2"
fi